# Author:	gong_libin
# Date:		2013_09_23

CC = g++
CFLAGS = -g -Wall
CFLAGS += -D_GLB_DEBUG_

GLB_ENV = $(shell pwd)
GLB_BIN = $(GLB_ENV)/bin
GLB_INC = $(GLB_ENV)/inc
GLB_SRC = $(GLB_ENV)/src

GLB_GLIB = /usr/lib
GLB_GINC = /usr/include/GlbInc

export CC
export CFLAGS

export GLB_ENV
export GLB_BIN
export GLB_INC
export GLB_SRC

export GLB_GLIB
export GLB_GINC

.PHONY: bin src test tool

all: bin src test tool

bin:
	if test -d $(GLB_BIN); then true; else mkdir $(GLB_BIN); fi;

src:
	$(MAKE) -C src

test:
	$(MAKE) -C test

tool:
	$(MAKE) -C tool

clean:
	$(MAKE) clean -C tool
	$(MAKE) clean -C test
	$(MAKE) clean -C src
	rm -rf $(GLB_BIN)
